ITERATIONS ?= 1000
FLAGS_STR = -mcmodel=medany -DPERFORMANCE_RUN=1 -DMAIN_HAS_NOARGC=1 -DHAS_STDIO \
					  -DHAS_PRINTF -DHAS_TIME_H -DUSE_CLOCK -DHAS_FLOAT=0 -DITERATIONS=$(ITERATIONS) \
						-O3 -fno-common -funroll-loops -finline-functions -fselective-scheduling \
						-falign-functions=16 -falign-jumps=4 -falign-loops=4 -finline-limit=1000 \
					 	-nostartfiles -nostdlib -ffast-math -fno-builtin-printf \
						-mexplicit-relocs

override RISCV_GCC_OPTS=$(FLAGS_STR) -DFLAGSTR=\""$(FLAGS_STR)"\"
override RISCV_INC+= -I$(PWD)
.PHONY: coremarks
coremarks:
	$(RISCV_GCC) -g $(RISCV_INC) $(RISCV_GCC_OPTS) -march=$(RISCV_MARCH) $(RISCV_LINK_OPTS) \
		-T $(RISCV_LINK) -o $(BUILD)/coremarks ./core_util.c ./ee_printf.c \
		./core_state.c ./core_list_join.c ./core_portme.c ./core_main.c ./core_matrix.c \
		$(BUILD)/crt.o $(BUILD)/syscalls.o

